package com.hetang.maijiayun.adaptertools.utils;

/**
 * 异常类
 *
 * @author 李东阳
 * @version 1.0.0
 */
public class AdapterException extends Exception {
    private static final long serialVersionUID = 1L;
    private String errorCode = null;
    private String errorMsg = null;
    private String resolvedMsg = null;

    /**
     * 构造函数：errorCode
     */
    public AdapterException(String errorCode) {
        super("");
        this.errorCode = errorCode;
    }

    /**
     * 构造函数：errorCode。errorMsg
     */
    public AdapterException(String errorCode, String errorMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
    }

    /**
     * 构造函数：errorCode。errorMsg。resolvedMsg
     */
    public AdapterException(String errorCode, String errorMsg, String resolvedMsg) {
        super(errorMsg);
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.resolvedMsg = resolvedMsg;
    }

    /**
     * 取得异常编码，限定在30个字节
     *
     * @return 异常编码，限定在30个字节
     */
    public String getErrorCode() {
        return this.errorCode;
    }

    /**
     * 设置异常编码，限定在30个字节
     *
     * @param errorCode 异常编码，限定在30个字节
     */
    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    /**
     * 取得异常描述，限定在1000个字节
     *
     * @return 异常描述，限定在1000个字节
     */
    public String getErrorMsg() {
        return this.errorMsg;
    }

    /**
     * 设置异常描述，限定在1000个字节
     *
     * @param errorMsg 异常描述，限定在1000个字节
     */
    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    /**
     * 取得解决方法描述，限定在1000个字节，可为null
     *
     * @return 解决方法描述，限定在1000个字节，可为null
     */
    public String getResolvedMsg() {
        return this.resolvedMsg;
    }

    /**
     * 设置解决方法描述，限定在1000个字节，可为null
     *
     * @param resolvedMsg 解决方法描述，限定在1000个字节，可为null
     */
    public void setResolvedMsg(String resolvedMsg) {
        this.resolvedMsg = resolvedMsg;
    }
}